package com.itqf;

import com.itqf.service.UserService;
import com.itqf.service.impl.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/9
 * @Time: 下午3:59
 */
public class TestAutowired {

    public  static  void  main(String[]args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext-autowired.xml");

        UserService userService = (UserServiceImpl)ac.getBean("userService");

        userService.insert();
        userService.update();
    }

}
